using System.Data;
using ET;
namespace DAL
{
    public class Vocative_DAL
    {
        private static readonly clsConnect cls = new clsConnect();

        #region Getdata
        public DataTable BindGirdVocative(string keywords)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@KeyWords", keywords);
            return cls.GetData("sp_tb_Vocative_Search");
        }
        public DataTable BindGirdtb_VocativeDetail(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Vocative_ID", id);
            return cls.GetData("sp_tb_Vocative_Detail");
        }
        #endregion

        #region Insert
        public bool InsertVocative(Vocative_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Vocative_Name", data.Vocative_Name);
            return cls.ExecuteNonQuery("sp_tb_Vocative_Insert");
        }
        #endregion

        #region Update
        public bool UpdateVocative(Vocative_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Vocative_Id", data.Vocative_Id);
            cls.AddParameter("@Vocative_Name", data.Vocative_Name);
            return cls.ExecuteNonQuery("sp_tb_Vocative_Update");
        }
        #endregion

        #region Delete
        public bool DeleteVocative(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@Vocative_ID", id);
            return cls.ExecuteNonQuery("sp_tb_Vocative_Delete");
        }
        #endregion
    }
}